package com.lineage.server.datatables;

import com.lineage.server.utils.L1QueryUtil;
import java.sql.Timestamp;

public class RecordTable {
  private static RecordTable _instance;
  
  public static RecordTable get() {
    if (_instance == null)
      _instance = new RecordTable(); 
    return _instance;
  }
  
  public void recordPcChangePassWord1(String accName, String pcName) {
    String sql = "INSERT INTO character_角色_删人 (帐号, 玩家, 时间) VALUE (?, ?, SYSDATE())";
    L1QueryUtil.execute("INSERT INTO character_角色_删人 (帐号, 玩家, 时间) VALUE (?, ?, SYSDATE())", new Object[] { accName, pcName });
  }
  
  public void recordtakeitem(String pcName, String itemName, int itemCount, int itemObjid, String ip) {
    String sql = "INSERT INTO character_角色_捡物 (玩家,捡取物品,数量,编号,IP,时间) VALUE (?, ?, ?, ?, ?, SYSDATE())";
    L1QueryUtil.execute("INSERT INTO character_角色_捡物 (玩家,捡取物品,数量,编号,IP,时间) VALUE (?, ?, ?, ?, ?, SYSDATE())", 
        new Object[] { pcName, itemName, Integer.valueOf(itemCount), Integer.valueOf(itemObjid), ip });
  }
  
  public void recordgivenpc(String pcName, String itemName, int itemCount, int itemObjid, String ip) {
    String sql = "INSERT INTO character_角色_丢怪 (玩家,道具,数量,编号,IP,时间) VALUE (?, ?, ?, ?, ?, SYSDATE())";
    L1QueryUtil.execute("INSERT INTO character_角色_丢怪 (玩家,道具,数量,编号,IP,时间) VALUE (?, ?, ?, ?, ?, SYSDATE())", 
        new Object[] { pcName, itemName, Integer.valueOf(itemCount), Integer.valueOf(itemObjid), ip });
  }
  
  public void recorddropitem(String pcName, String itemName, int itemCount, int itemObjid, String ip) {
    String sql = "INSERT INTO character_角色_丢物 (玩家,道具,数量,编号,IP,时间) VALUE (?, ?, ?, ?, ?, SYSDATE())";
    L1QueryUtil.execute("INSERT INTO character_角色_丢物 (玩家,道具,数量,编号,IP,时间) VALUE (?, ?, ?, ?, ?, SYSDATE())", 
        new Object[] { pcName, itemName, Integer.valueOf(itemCount), Integer.valueOf(itemObjid), ip });
  }
  
  public void recordDeleItem(String pcName, String itemName, int itemCount, int itemObjid, String ip) {
    String sql = "INSERT INTO character_角色_删物 (玩家,道具,数量,编号,IP,时间) VALUE (?, ?, ?, ?, ?, SYSDATE())";
    L1QueryUtil.execute("INSERT INTO character_角色_删物 (玩家,道具,数量,编号,IP,时间) VALUE (?, ?, ?, ?, ?, SYSDATE())", 
        new Object[] { pcName, itemName, Integer.valueOf(itemCount), Integer.valueOf(itemObjid), ip });
  }
  
  public void recordeDeadItem(String pcName, String itemName, int itemCount, int itemObjid, String ip) {
    String sql = "INSERT INTO character_角色_喷装 (玩家,道具,数量,编号,IP,时间) VALUE (?, ?, ?, ?, ?, SYSDATE())";
    L1QueryUtil.execute("INSERT INTO character_角色_喷装 (玩家,道具,数量,编号,IP,时间) VALUE (?, ?, ?, ?, ?, SYSDATE())", 
        new Object[] { pcName, itemName, Integer.valueOf(itemCount), Integer.valueOf(itemObjid), ip });
  }
  
  public void recordeShop(String pcName, String targeName, String itemName, int itemCount, int itemObjid, int money, String moneyName, String ipA, String ipB) {
    String sql = "INSERT INTO character_角色_摆摊 (买方,卖方,物品,数量,编号,花费,币种,买方IP,卖方IP,时间) VALUE (?, ?, ?, ?, ?, ?, ?, ?, ?, SYSDATE())";
    L1QueryUtil.execute("INSERT INTO character_角色_摆摊 (买方,卖方,物品,数量,编号,花费,币种,买方IP,卖方IP,时间) VALUE (?, ?, ?, ?, ?, ?, ?, ?, ?, SYSDATE())", new Object[] { pcName, targeName, itemName, Integer.valueOf(itemCount), 
          Integer.valueOf(itemObjid), Integer.valueOf(money), moneyName, ipA, ipB });
  }
  
  public void recordeTrade(String pcName, String targeName, String itemName, int bless, int itemCount, int itemObjid, String ipA, String ipB) {
    String sql = "INSERT INTO character_角色_交易 (交易者,接受者,物品,是否祝福,数量,编号,交易者IP,接受者IP,时间) VALUE (?, ?,?, ?, ?, ?, ?, ?, SYSDATE())";
    L1QueryUtil.execute("INSERT INTO character_角色_交易 (交易者,接受者,物品,是否祝福,数量,编号,交易者IP,接受者IP,时间) VALUE (?, ?,?, ?, ?, ?, ?, ?, SYSDATE())", new Object[] { pcName, targeName, itemName, Integer.valueOf(bless), Integer.valueOf(itemCount), 
          Integer.valueOf(itemObjid), ipA, ipB });
  }
  
  public void recordeTalk(String mod, String pcName, String pcClan, String targeName, String content) {
    String sql = "INSERT INTO character_角色_聊天 (频道,发话,血盟,对象,内容,时间) VALUE (?, ?, ?, ?, ?, SYSDATE())";
    L1QueryUtil.execute("INSERT INTO character_角色_聊天 (频道,发话,血盟,对象,内容,时间) VALUE (?, ?, ?, ?, ?, SYSDATE())", new Object[] { mod, pcName, pcClan, targeName, content });
  }
  
  public void bugTalk(String pcName, String content) {
    String sql = "INSERT INTO character_bug回报 (玩家,内容,时间) VALUE (?, ?, SYSDATE())";
    L1QueryUtil.execute("INSERT INTO character_bug回报 (玩家,内容,时间) VALUE (?, ?, SYSDATE())", new Object[] { pcName, content });
  }
  
  public void aikill(String pcName) {
    String sql = "INSERT INTO character_角色_ai验证 (玩家,时间) VALUE (?, SYSDATE())";
    L1QueryUtil.execute("INSERT INTO character_角色_ai验证 (玩家,时间) VALUE (?, SYSDATE())", new Object[] { pcName });
  }
  
  public void recordeCmd(String pcName, String cmd, String note, String ip) {
    String sql = "INSERT INTO character_gm_指令 (GM,指令,说明,IP,时间) VALUE (?, ?, ?, ?, SYSDATE())";
    L1QueryUtil.execute("INSERT INTO character_gm_指令 (GM,指令,说明,IP,时间) VALUE (?, ?, ?, ?, SYSDATE())", new Object[] { pcName, cmd, note, ip });
  }
  
  public void recordeSponsor(String pcName, int sponsor, int allowance, String ip) {
    String sql = "INSERT INTO character_赞助 (玩家,赞助,额外,IP,时间) VALUE (?, ?, ?, ?, SYSDATE())";
    L1QueryUtil.execute("INSERT INTO character_赞助 (玩家,赞助,额外,IP,时间) VALUE (?, ?, ?, ?, SYSDATE())", new Object[] { pcName, Integer.valueOf(sponsor), Integer.valueOf(allowance), ip });
  }
  
  public void recordeSponsorItem(String accName, String pcName, int sponsor, String ip) {
    String sql = "INSERT INTO character_赞助_满额礼 (帐号,玩家,满额,IP,时间) VALUE (?, ?, ?, ?, SYSDATE())";
    L1QueryUtil.execute("INSERT INTO character_赞助_满额礼 (帐号,玩家,满额,IP,时间) VALUE (?, ?, ?, ?, SYSDATE())", new Object[] { accName, pcName, Integer.valueOf(sponsor), ip });
  }
  
  public void recordeItemEcho(String pcName, String itemName, int count, int item_obj, String s, String ip) {
    String sql = "INSERT INTO character_掉宝 (玩家,道具,数量,编号,来源,IP,时间) VALUE (?, ?, ?, ?, ?, ?, SYSDATE())";
    L1QueryUtil.execute("INSERT INTO character_掉宝 (玩家,道具,数量,编号,来源,IP,时间) VALUE (?, ?, ?, ?, ?, ?, SYSDATE())", 
        new Object[] { pcName, itemName, Integer.valueOf(count), Integer.valueOf(item_obj), s, ip });
  }
  
  public void recordPcChangePassWord(int pcid, String accName, String pcName, String changPass, String ip) {
    String sql = "INSERT INTO character_角色_改密 (编号, 帐号, 玩家, 改密, IP, 时间) VALUE (?, ?, ?, ?, ?, SYSDATE())";
    L1QueryUtil.execute("INSERT INTO character_角色_改密 (编号, 帐号, 玩家, 改密, IP, 时间) VALUE (?, ?, ?, ?, ?, SYSDATE())", new Object[] { Integer.valueOf(pcid), accName, pcName, changPass, ip });
  }
  
  public void recordPcChangeName(int pcid, String accName, String pcName, String changName, String ip) {
    String sql = "INSERT INTO character_角色_更名 (编号, 帐号, 玩家, 改名, IP, 时间) VALUE (?, ?, ?, ?, ?, SYSDATE())";
    L1QueryUtil.execute("INSERT INTO character_角色_更名 (编号, 帐号, 玩家, 改名, IP, 时间) VALUE (?, ?, ?, ?, ?, SYSDATE())", new Object[] { Integer.valueOf(pcid), accName, pcName, changName, ip });
  }
  
  public void recordCastleReward(String castle, String pcName, String itemName, int count, int item_obj, String ip) {
    String sql = "INSERT INTO character_攻城奖励 (城堡,玩家,物品,数量,编号,IP,时间) VALUE (?, ?, ?, ?, ?, ?, SYSDATE())";
    L1QueryUtil.execute("INSERT INTO character_攻城奖励 (城堡,玩家,物品,数量,编号,IP,时间) VALUE (?, ?, ?, ?, ?, ?, SYSDATE())", 
        new Object[] { castle, pcName, itemName, Integer.valueOf(count), Integer.valueOf(item_obj), ip });
  }
  
  public void r_teleport(String pcName, String note) {
    String sql = "INSERT INTO character_除错_传送 (玩家, 说明, 时间) VALUE (?, ?, SYSDATE())";
    L1QueryUtil.execute("INSERT INTO character_除错_传送 (玩家, 说明, 时间) VALUE (?, ?, SYSDATE())", new Object[] { pcName, note });
  }
  
  public void r_bug(String note) {
    String sql = "INSERT INTO character_除错_封包 (说明, 时间) VALUE (?, SYSDATE())";
    L1QueryUtil.execute("INSERT INTO character_除错_封包 (说明, 时间) VALUE (?, SYSDATE())", new Object[] { note });
  }
  
  public void r_speed(String pcName, String note) {
    String sql = "INSERT INTO character_加速 (玩家, 说明, 时间) VALUE (?, ?, SYSDATE())";
    L1QueryUtil.execute("INSERT INTO character_加速 (玩家, 说明, 时间) VALUE (?, ?, SYSDATE())", new Object[] { pcName, note });
  }
  
  public void recordFailureArmor(String pcName, String itemName, String armorName, int enchant, int armorObjid, String note, String ip) {
    String sql = "INSERT INTO character_角色_冲装 (玩家,使用,装备,强化值,编号,说明,IP,时间) VALUE (?, ?, ?, ?, ?, ?, ?, SYSDATE())";
    L1QueryUtil.execute("INSERT INTO character_角色_冲装 (玩家,使用,装备,强化值,编号,说明,IP,时间) VALUE (?, ?, ?, ?, ?, ?, ?, SYSDATE())", new Object[] { pcName, itemName, armorName, Integer.valueOf(enchant), Integer.valueOf(armorObjid), note, ip });
  }
  
  public void recordFailureArmor1(String pcName, String itemName, String armorName, int armorObjid, String note, String ip) {
    String sql = "INSERT INTO character_装武_保护 (玩家,使用,装备,编号,说明,IP,时间) VALUE (?, ?, ?, ?, ?, ?, SYSDATE())";
    L1QueryUtil.execute("INSERT INTO character_装武_保护 (玩家,使用,装备,编号,说明,IP,时间) VALUE (?, ?, ?, ?, ?, ?, SYSDATE())", new Object[] { pcName, itemName, armorName, Integer.valueOf(armorObjid), note, ip });
  }
  
  public void recordeWarehouse_elf(String pcName, String action, String warehouse, String itemName, int itemCount, int itemObjid, String ip) {
    String sql = "INSERT INTO character_角色_妖仓 (玩家,执行,仓库,道具,数量,编号,IP,时间) VALUE (?, ?, ?, ?, ?, ?, ?, SYSDATE())";
    L1QueryUtil.execute("INSERT INTO character_角色_妖仓 (玩家,执行,仓库,道具,数量,编号,IP,时间) VALUE (?, ?, ?, ?, ?, ?, ?, SYSDATE())", new Object[] { pcName, action, warehouse, itemName, Integer.valueOf(itemCount), 
          Integer.valueOf(itemObjid), ip });
  }
  
  public void recordeWarehouse_clan(String pcName, String action, String warehouse, String itemName, int itemCount, int itemObjid, String ip) {
    String sql = "INSERT INTO character_角色_盟仓 (玩家,执行,仓库,道具,数量,编号,IP,时间) VALUE (?, ?, ?, ?, ?, ?, ?, SYSDATE())";
    L1QueryUtil.execute("INSERT INTO character_角色_盟仓 (玩家,执行,仓库,道具,数量,编号,IP,时间) VALUE (?, ?, ?, ?, ?, ?, ?, SYSDATE())", new Object[] { pcName, action, warehouse, itemName, Integer.valueOf(itemCount), 
          Integer.valueOf(itemObjid), ip });
  }
  
  public void recordeWarehouse_pc(String pcName, String action, String warehouse, String itemName, int itemCount, int itemObjid, String ip) {
    String sql = "INSERT INTO character_角色_个仓 (玩家,执行,仓库,道具,数量,编号,IP,时间) VALUE (?, ?, ?, ?, ?, ?, ?, SYSDATE())";
    L1QueryUtil.execute("INSERT INTO character_角色_个仓 (玩家,执行,仓库,道具,数量,编号,IP,时间) VALUE (?, ?, ?, ?, ?, ?, ?, SYSDATE())", new Object[] { pcName, action, warehouse, itemName, Integer.valueOf(itemCount), 
          Integer.valueOf(itemObjid), ip });
  }
  
  public void recordWarehouse_char_pc(String pcName, String action, String warehouse, String itemName, int itemCount, int itemObjid, String ip) {
    String sql = "INSERT INTO character_角色_角仓 (玩家,执行,仓库,道具,数量,编号,IP,时间) VALUE (?, ?, ?, ?, ?, ?, ?, SYSDATE())";
    L1QueryUtil.execute("INSERT INTO character_角色_角仓 (玩家,执行,仓库,道具,数量,编号,IP,时间) VALUE (?, ?, ?, ?, ?, ?, ?, SYSDATE())", new Object[] { pcName, action, warehouse, itemName, Integer.valueOf(itemCount), 
          Integer.valueOf(itemObjid), ip });
  }
  
  public void recordeShop1(String pcName, String moneyName, int moneyCount, String itemName, int itemCount, int itemObjid, String ip) {
    String sql = "INSERT INTO character_消费 (玩家,币种,消费,物品,数量,编号,IP,时间) VALUE (?, ?, ?, ?, ?, ?, ?, SYSDATE())";
    L1QueryUtil.execute("INSERT INTO character_消费 (玩家,币种,消费,物品,数量,编号,IP,时间) VALUE (?, ?, ?, ?, ?, ?, ?, SYSDATE())", new Object[] { pcName, moneyName, Integer.valueOf(moneyCount), itemName, 
          Integer.valueOf(itemCount), Integer.valueOf(itemObjid), ip });
  }
  
  public void killpc(String pcName, String targeName) {
    String sql = "INSERT INTO character_角色_杀人 (生存,死亡,时间) VALUE (?, ?, SYSDATE())";
    L1QueryUtil.execute("INSERT INTO character_角色_杀人 (生存,死亡,时间) VALUE (?, ?, SYSDATE())", new Object[] { pcName, targeName });
  }
  
  public void rangiveitem(String pcName) {
    String sql = "INSERT INTO character_角色_随机礼物 (玩家,时间) VALUE (?, SYSDATE())";
    L1QueryUtil.execute("INSERT INTO character_角色_随机礼物 (玩家,时间) VALUE (?, SYSDATE())", new Object[] { pcName });
  }
  
  public void recordbox(String pcName, String itemNamebox, String itemName, int itemCount) {
    String sql = "INSERT INTO character_角色_宝箱 (玩家,使用宝箱,获得道具,数量,时间) VALUE (?, ?, ?, ?,  SYSDATE())";
    L1QueryUtil.execute("INSERT INTO character_角色_宝箱 (玩家,使用宝箱,获得道具,数量,时间) VALUE (?, ?, ?, ?,  SYSDATE())", new Object[] { pcName, itemNamebox, itemName, Integer.valueOf(itemCount) });
  }
  
  public void recordItemTime(String pcName, String itemName, Timestamp timer, int item_obj) {
    String sql = "INSERT INTO character_物品_时间 (玩家,道具,期限,编号,时间) VALUE (?, ?, ?, ?, SYSDATE())";
    L1QueryUtil.execute("INSERT INTO character_物品_时间 (玩家,道具,期限,编号,时间) VALUE (?, ?, ?, ?, SYSDATE())", new Object[] { pcName, itemName, timer, Integer.valueOf(item_obj) });
  }
  
  public void guaji(String pcName, String action) {
    String sql = "INSERT INTO character_角色_使用挂机 (玩家,开启方式,时间) VALUE (?,?, SYSDATE())";
    L1QueryUtil.execute("INSERT INTO character_角色_使用挂机 (玩家,开启方式,时间) VALUE (?,?, SYSDATE())", new Object[] { pcName, action });
  }
  
  public void reshp(String pcName) {
    String sql = "INSERT INTO character_角色_洗血 (玩家,时间) VALUE (?, SYSDATE())";
    L1QueryUtil.execute("INSERT INTO character_角色_洗血 (玩家,时间) VALUE (?, SYSDATE())", new Object[] { pcName });
  }
  
  public void reshp1(String pcName) {
    String sql = "INSERT INTO character_回忆蜡烛(玩家,时间) VALUE (?, SYSDATE())";
    L1QueryUtil.execute("INSERT INTO character_回忆蜡烛(玩家,时间) VALUE (?, SYSDATE())", new Object[] { pcName });
  }
}
